package com.观察者模式.案列2;

import com.观察者模式.案列2.dto.OmsDto;
import com.观察者模式.案列2.subject.SubjectImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/gcz")
public class TestController {

    @Autowired
    SubjectImpl subject;

    @GetMapping(value = "/test")
    public String test(Long orderid){
        for (int i=0;i<100;i++){
            OmsDto omsDto=new OmsDto(i,i,i,i);
            subject.setOmsDto(omsDto);
        }

        return "成功";
    }
}
